/**
 * 
 */
package org.extdev.device.ltr;

import java.util.List;

import org.extdev.libraries.ltr.LTRAPIFacadeFactory;
import org.extdev.libraries.ltr.LTRAPILibraryFacade;
import org.extdev.libraries.ltr.LTRException;


/**
 * @author LAP
 *
 */
public class LTRLibServer implements LTRCrateKeeper{
	
	private List<LTRCrate> crates;
	private LTRAPILibraryFacade facade;

	public LTRLibServer() throws LTRException {
		facade = LTRAPIFacadeFactory.getInstance().getLTRServerFacade();
		updateContent();
	}
	
	@Override
	public void updateContent() throws LTRException {
		crates = facade.getCrates();
	}

	@Override
	public List<LTRCrate> getCrates() {
		return crates;
	}
}
